<?php
/**
 * Created by JetBrains PhpStorm.
 * User: FUHU
 * Date: 9/28/13
 * Time: 10:04 AM
 * To change this template use File | Settings | File Templates.
 */

namespace Helloworld;

class Module
{
    public function getConfig()
    {
        return include __DIR__.'/config/module.config.php';
    }

    public function getAutoloaderConfig()
    {
        return array(
//            'Zend\Loader\ClassMapAutoloader'=> array(
//                __DIR__.'/autoload_classmap.php'
//            ),
            'Zend\Loader\StandardAutoloader' => array(
                'namespaces' => array(
                    __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__,
                ),
            ),
        );
    }

    public function getServiceConfig()
    {
        return array(
            'factories' => array(
                'Helloworld\Model\UsersTable' => function($sm){
                  $dbAdapter = $sm->get('Zend\Db\Adapter\Adapter');
                    $table = new \Helloworld\Model\UsersTable($dbAdapter);
                    return $table;
                },
            ),
        );
    }
}